// 基于template/src/widgets/{{appEntities}}/{{ctrls@SEARCHFORM}}-searchform/{{spinalCase ctrl.codeName}}-searchform-model.ts.hbs生成
import { ISearchFormModel } from "@/core";

function getModel(): ISearchFormModel {
    return {
        name: "searchform",
        caption: "",
        codeName: "Default",
        cssName: "",
        controlType: "SEARCHFORM",
        formStyle: '',
        entityCodeName: "IBIZOrder",
        ctrlMsgModel:[
    ],
        keyPSAppDEField: "IBIZOrderId",
        majorPSAppDEField: "IBIZOrderName",
        searchButtonStyle: 'DEFAULT',
        searchButtonPos: '',
        enableAutoSearch: false,
        layoutType:'TABLE_24COL',
        detailModel: getDetailModel(),
        valueRule: getValueRule(),
        createDefaultItems: getCreateDefaultItems(),
    }
}

function getDetailModel() {
    return {
        formpage1: {
            caption: "订单名称",
            captionItemName: "",
            name: "formpage1",
            codeName: "formpage1",
            disabled: false, 
            visible: true,
            detailStyle: "DEFAULT",
            detailType: "FORMPAGE",
            showCaption: false,
            enableAnchor: false,
            showMoreMode: 0,
        },
        n_ibizordername_like: {
            caption: "订单名称(%)",
            captionItemName: "",
            name: "n_ibizordername_like",
            codeName: "n_ibizordername_like",
            disabled: false, 
            visible: true,
            detailStyle: "DEFAULT",
            detailType: "FORMITEM",
            showCaption: true,
            enableAnchor: false,
            showMoreMode: 0,
            valueFormat: "",
            fieldCodeName: "IBIZOrderName",
            dataType: "25",
            required: false,
            enableCond: 3,
            ignoreInput: 0,
            convertToCodeItemText: false,
            layout:{parentLayout: 'TABLE_24COL',colLG: 8,colMD: 8,colSM: 8,colXS: 8,},
        },
        n_orderstate_eq: {
            caption: "订单状态(=)",
            captionItemName: "",
            name: "n_orderstate_eq",
            codeName: "n_orderstate_eq",
            disabled: false, 
            visible: true,
            detailStyle: "DEFAULT",
            detailType: "FORMITEM",
            showCaption: true,
            enableAnchor: false,
            showMoreMode: 0,
            valueFormat: "",
            fieldCodeName: "OrderState",
            dataType: "25",
            required: false,
            enableCond: 3,
            ignoreInput: 0,
            convertToCodeItemText: false,
            codeListTag: "common__ORDERSTATE",
            layout:{parentLayout: 'TABLE_24COL',colLG: 8,colMD: 8,colSM: 8,colXS: 8,},
        },
        n_ordertype_eq: {
            caption: "订单类型(=)",
            captionItemName: "",
            name: "n_ordertype_eq",
            codeName: "n_ordertype_eq",
            disabled: false, 
            visible: true,
            detailStyle: "DEFAULT",
            detailType: "FORMITEM",
            showCaption: true,
            enableAnchor: false,
            showMoreMode: 0,
            valueFormat: "",
            fieldCodeName: "OrderType",
            dataType: "25",
            required: false,
            enableCond: 3,
            ignoreInput: 0,
            convertToCodeItemText: false,
            codeListTag: "common__DYNAORDERTYPE",
            layout:{parentLayout: 'TABLE_24COL',colLG: 8,colMD: 8,colSM: 8,colXS: 8,},
        },
        n_ibizcustomername_like: {
            caption: "客户名称(%)",
            captionItemName: "",
            name: "n_ibizcustomername_like",
            codeName: "n_ibizcustomername_like",
            disabled: false, 
            visible: true,
            detailStyle: "DEFAULT",
            detailType: "FORMITEM",
            showCaption: true,
            enableAnchor: false,
            showMoreMode: 0,
            valueFormat: "",
            fieldCodeName: "IBIZCustomerName",
            dataType: "25",
            required: false,
            enableCond: 3,
            ignoreInput: 0,
            convertToCodeItemText: false,
            layout:{parentLayout: 'TABLE_24COL',colLG: 8,colMD: 8,colSM: 8,colXS: 8,},
        },
        n_ordertime_gt: {
            caption: "订单时间",
            captionItemName: "",
            name: "n_ordertime_gt",
            codeName: "n_ordertime_gt",
            disabled: false, 
            visible: true,
            detailStyle: "DEFAULT",
            detailType: "FORMITEM",
            showCaption: true,
            enableAnchor: false,
            showMoreMode: 0,
            valueFormat: "YYYY-MM-DD",
            fieldCodeName: "OrderTime",
            dataType: "5",
            required: false,
            enableCond: 3,
            ignoreInput: 0,
            convertToCodeItemText: false,
            editRules: {
                editorType: 'DATEPICKEREX_NOTIME',
            },
            layout:{parentLayout: 'TABLE_24COL',colLG: 8,colMD: 8,colSM: 8,colXS: 8,},
        },
    }
}

function getCreateDefaultItems() {
    return [
    ]
}

function getValueRule() {
    return [
    ]
}

export const model = getModel();